/* ----------------------------------------------------------------------------
 
    java api for ecco generated applications 
 
    (C)  by PDTec GmbH 2000
   
    This bundle of java classes allows java applications to interact with
	ecco generated applications.

  ----------------------------------------------------------------------------*/

package pdtec.ecco.meta;

/** Represents EXPRESS enum types. */
public class EnumType extends Type {
    
    /** The standard constructor is protected. */
    protected EnumType(){}

    /** Protected constructor.
     * @see pdtec.ecco.meta.Type#Type(int,long)
     */
    protected EnumType(int appId, long id) {
	super(appId, id);
    } // constructor 

    /** Returns the list of literals defined in the enumeration.
     * @exception EccoException in case an error occurs
     */
    public native synchronized String[] getLiterals() throws EccoException;
    
    /** Finalizes the object and calls delete. */
    protected void finalize() {
	try { 
	    // throw (new EccoException("finalizing ..."));
	    if ( appId != -1) 
		delete(); 
	} catch(EccoException e) {
	    System.out.println("EccoException " + e.toString() );
	} // try
    } // finalize
    
} // EnumType


